<template>
  <van-tabbar route>
    <van-tabbar-item 
    replace 
    :to="item.path" 
    :icon="item.icon" 
    v-for="item in navInfo" 
    :key="item.path"
    :badge="item.number && item.number"
    >
    {{ item.title }}
    </van-tabbar-item>
    
  </van-tabbar>
</template>

<script setup lang="ts">
const navInfo:any[] = [
  {
    path:'/home',
    title:'首页',
    icon:'home-o'
  },
  {
    path:'/classify',
    title:'分类',
    icon:'apps-o'
  },
  {
    path:'/community',
    title:'社区',
    icon:'good-job-o'
  },
  {
    path:'/cart',
    title:'购物车',
    icon:'cart-o',
    number:5
  },
  {
    path:'/mine',
    title:'我的',
    icon:'manager-o'
  }
]
</script>

<style lang="less" scoped></style>
